package io.io.Pra;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Copy {
    public static void main(String[] args) throws IOException{
        FileOutputStream fileOutputStream = new FileOutputStream("2.png");
        FileInputStream fileInputStream = new FileInputStream("1.png");
        int a;
        byte[] bytes = new byte[1024 * 10];
        if ((a=fileInputStream.read(bytes))!=-1){
            fileOutputStream.write(a);
        }

    fileInputStream.close();
        fileOutputStream.close();

    }
}
